OLE Automation SearchFor ExampleSearchFor Example Dim searchResults As Object Dim search2 As Object ‘ get the list of files containing the phrase entered ‘ in the Text1 field Set searchResults = wilbur.SearchFor(Text1.Text) ‘ Extract the names from the list and use them ' to fill a list box Dim bResult As Boolean Dim nCount As Integer nCount = 0 bResult = searchResults.setToStart While bResult Dim lastMod As DatelastMod = searchResults.getModifiedDate List1.AddItem searchResults.getPath + _ Chr(9) + Format(lastMod)bResult = searchResults.setToNext nCount = nCount + 1 Wend This will search the index and place matching files in the searchResults object. This list is then looped through and the path names and modified dates of the files are placed in the list box. |
Copyright ⌐ 1999 RedTree
Development Inc. All rights reserved. |